#Fredkin gate structure program

#Constant Definitions
DEBUG = 1

cfgfileopen = open("Input.cfg","r");
splitline = cfgfileopen.readline().split();
print splitline[4];
ctrlvarno = splitline[4];

splitline = cfgfileopen.readline().split();
print splitline[2];

splitline = cfgfileopen.readline().split();
print splitline[2];

splitline = cfgfileopen.readline().split();
print splitline[4];
func_level_1 = splitline[4];

splitline = cfgfileopen.readline().split();
print splitline[4];
func_level_2 = splitline[4];

splitline = cfgfileopen.readline().split();
print splitline[3];
func_1_pos = splitline[3];

splitline = cfgfileopen.readline().split();
print splitline[3];
func_2_pos = splitline[3];

if DEBUG:
  print "ctrlvarno: ",ctrlvarno;

func_1 = raw_input("Enter function 1: ");
if DEBUG:
  print "Function 1: ",func_1;

func_2 = raw_input("Enter function 2: ");
if DEBUG:
  print "Function 2: ",func_2;

if DEBUG:
  print "Function 1 Input Level:", func_level_1;

if DEBUG:
  print "Function 2 Input Level:", func_level_2;

if DEBUG:
  print "Function 1 Input Position: ",func_1_pos;

if DEBUG:
  print "Function 2 Input Position: ",func_2_pos;


